/*
 *  $Id: ArrowShot.cs 1004 2010-05-03 11:50:53Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Neutral.Abilities {
    public class ArrowShot: AbilityCard<Creature> {
        public readonly int Power;

        public ArrowShot(): this("001_n_a_arrow_shot", 1) {}
        public ArrowShot(int power): this("001_n_a_arrow_shot", power) {
            SetPictureSource<ArrowShot>();
        }

        public ArrowShot(string id, int power): base(id) {
            Power = power;
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Neutral;
            Target = CreatureTarget.Enemy;
        }

        public override string DescriptionText {
            get { return Description.GetText(Power); }
        }

        protected override void DoAction(TargetArgs<Creature> args) {
            int power = Power;
            if (args.Target.CanFly) power++;
            args.Target.DamageBy(NewDamage(args, DamageType.PhysicalAttack, power));
        }
    }
}
